package com.prs.crm.domain.sale;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.stock.Product;
import com.prs.crm.domain.store.StoreRoom;

@Entity
@Table(name = "sale_saleshippingDetail")
public class SalesShippingDetail extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	private String name;

	@ManyToOne
	private Product product;

	@ManyToOne
	private StoreRoom room;

	@ManyToOne
	private SalesShipping salesShipping;
	/**
	 * 数量
	 */

	private Integer number;
	/**
	 * 原价
	 */
	private Double oprice;
	/**
	 * 定价
	 */

	private Double fixedPrice;

	/**
	 * 折扣
	 */
	private Double rebate;
	/**
	 * 总价
	 */

	private Double totalPrice;
	/**
	 * 
	 *出库状态
	 */
	@Column(columnDefinition = "Integer(2) default '0'")
	private int outState;
	/**
	 * 
	 * 出库数量
	 */
	@Column(columnDefinition = "Integer(2) default '0'")
	private int outNum;
	/**
	 * 
	 * 出库批号及数量
	 */
	@Column(columnDefinition = "varchar(100) default '111'")
	private String detail;
	/**
	 * 退回数量
	 * @return
	 */
	@Column(columnDefinition = "Integer(2) default '0'")
	private int retruenNum;
	/**
	 * 退货状态
	 * @return
	 */
	@Column(columnDefinition = "Integer(2) default '0'")
	private int retruenState;
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public SalesShipping getSalesShipping() {
		return salesShipping;
	}

	public void setSalesShipping(SalesShipping salesShipping) {
		this.salesShipping = salesShipping;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public Double getFixedPrice() {
		return fixedPrice;
	}

	public void setFixedPrice(Double fixedPrice) {
		this.fixedPrice = fixedPrice;
	}

	public Double getRebate() {
		return rebate;
	}

	public void setRebate(Double rebate) {
		this.rebate = rebate;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public Double getOprice() {
		return oprice;
	}

	public void setOprice(Double oprice) {
		this.oprice = oprice;
	}

	public StoreRoom getRoom() {
		return room;
	}

	public void setRoom(StoreRoom room) {
		this.room = room;
	}

	public int getOutState() {
		return outState;
	}

	public void setOutState(int outState) {
		this.outState = outState;
	}

	public int getOutNum() {
		return outNum;
	}

	public void setOutNum(int outNum) {
		this.outNum = outNum;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public int getRetruenNum() {
		return retruenNum;
	}

	public void setRetruenNum(int retruenNum) {
		this.retruenNum = retruenNum;
	}

	public int getRetruenState() {
		return retruenState;
	}

	public void setRetruenState(int retruenState) {
		this.retruenState = retruenState;
	}

}
